//
//  AlbumViewController.m
//  LvXingPai
//
//  Created by _Junxee on 16/8/12.
//  Copyright © 2016年 _Junxee. All rights reserved.
//

#import "AlbumViewController.h"

@interface AlbumViewController ()

@end

@implementation AlbumViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    //设置相册标题
    self.title = [NSString stringWithFormat:@"%@图集",_Dmodel.zhName];
    
    //设置返回按钮样式
    UIBarButtonItem *leftBtn = [[UIBarButtonItem alloc]initWithTitle:@"取消" style:UIBarButtonItemStylePlain target:self action:@selector(backAction:)];
    leftBtn.tintColor = [UIColor whiteColor];
    self.navigationItem.leftBarButtonItem = leftBtn;
    
    //隐藏工具栏
    self.tabBarController.tabBar.hidden = YES;
}

-(void)backAction:(UIBarButtonItem *)sender{
    
    [UIView  beginAnimations:nil context:NULL];
    [UIView setAnimationCurve:UIViewAnimationCurveEaseIn];
    [UIView setAnimationDuration:1.5];
    [UIView setAnimationTransition:UIViewAnimationTransitionNone forView:self.navigationController.view cache:NO];
    [UIView commitAnimations];
    [UIView beginAnimations:nil context:NULL];
    [UIView setAnimationDelay:1.5];
    [self.navigationController popViewControllerAnimated:NO];
    [UIView commitAnimations];
}

-(void)setDmodel:(DestinModel *)Dmodel{
    _Dmodel = Dmodel;
}

@end
